<?php
namespace app\model\question;

use think\Model;

class ZxlKnowStoreQuestionSetModel extends Model
{
    protected $name = 'zxl_know_store_question_set';

    /**
     * 刷题数量
     * 
     * @return array
     */
    public static function getPracticeNum($key = '')
    {
        $type = [
            10 => "10题", 
            20 => "20题", 
            30 => "30题",
            50 => "50题",
            100 => "100题",
            300 => "300题",
            500 => "500题", 
            1000 => "1000题",
        ];
        if('' !== $key){
            if(array_key_exists($key,$type)){
                return $type[$key];
            }
            return false;
        }
        return $type;
    }

    /**
     * 刷题顺序
     * 
     * @return array
     */
    public static function getPracticeType($key = '')
    {
        $type = [
            0 => "随机抽题", 
            1 => "顺序抽题",
        ];
        if('' !== $key){
            if(array_key_exists($key,$type)){
                return $type[$key];
            }
            return false;
        }
        return $type;
    }

    /**
     * 刷题模式
     * 
     * @return array
     */
    public static function getPracticeMode($key = '')
    {
        $type = [
            0 => "考试模式", 
            1 => "背题模式",
            2 => "练题模式",
        ];
        if('' !== $key){
            if(array_key_exists($key,$type)){
                return $type[$key];
            }
            return false;
        }
        return $type;
    }
}